package org.act.BPEL2Automata.automata.module;


/**
 * <b>LogicalFormula</b> is a base class definition for 
 * <b>SimpleLogicalFormulaImp</b> and <b>ComplexLogicalFormulaImp</b>.
 * The later two ones are commonly used in practice.
 * @author baoxiwu<bb@feijiao.info>,ACT,Beihang University
 * @version 0.9.0
 * @since 2010-04-10
 * 
 */
public class LogicalFormula{
	//reserved for method updateACopy(LinkedList<State> stateSet,DualState newState,int matchType)
	//of SimpleLogicalFormulaImp and ComplexLogicalFormulaImp.
	public static final int MATCH_TYPE_LEFT = 0;
	public static final int MATCH_TYPE_RIGHT = 1;
	
	
	//equivalent to the concept IV(Independent Variable).
	private State key = null;
	
	
	public LogicalFormula(){
	//empty
	}
	

	public void setKey(State key){
		this.key = key;
	}
	
	public State getKey(){
		return this.key;
	}
	
	
	/*
	 * TODO
	 * this method returns the boolean value of this logical formula.
	 * And it needs to be implemented.
	 * 
	 */
	public boolean calculate(){
		return true;
	}
	
	//update a logical-formula's key and start state for operations of SubAutomataImp
	public void update(State state,State newState){}
	
}
